const seq = require('sequelize')
const time = require('../time');
module.exports = {
  NAME: 'sys_post',
  TABLE: {
    post_id: {
      type: seq.INTEGER(19),
      primaryKey: true,
      unique: true,
      autoIncrement: true,
      allowNull: false,
      comment: 'post_id 主键，自增',
      field: 'post_id', //  相应的字段名称
    },
    post_name: {
      type: seq.STRING(50),
      comment: '岗位名称',
      field: 'post_name',
      defaultValue: ''
    },
    post_code: {
      type: seq.STRING(50),
      comment: '岗位名称',
      field: 'post_code',
      defaultValue: ''
    },
    post_sort: {
      type: seq.INTEGER(),
      comment: '显示顺序',
      field: 'post_sort',
      defaultValue: 0
    },
    status:{
      type: seq.CHAR(1),
      comment: '状态（1正常 0停用）',
      field: 'status',
      defaultValue: '1'
    },
    remark: {
      type: seq.STRING(500),
      comment: '备注',
      field: 'remark',
      defaultValue: ''
    },
    del_flag:{
      type: seq.CHAR(1),
      comment: '删除标志（0代表存在 2代表删除）',
      field: 'del_flag',
      defaultValue: '0'
    },
    ...time.create_date,
    ...time.update_date,
    ...time.create_by,
    ...time.update_by,
  },
}
